package com.breakfast.fun.ui.user.login;

import com.breakfast.fun.base.BaseModel;
import com.breakfast.fun.base.BasePresenter;
import com.breakfast.fun.base.BaseView;
import com.breakfast.fun.data.entity.user.Login;
import com.breakfast.fun.data.entity.user.Result;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 16/9/26.
 */

public interface RegisterContract {
    interface Model extends BaseModel {
        Observable<Result> getCodeModel(@FieldMap Map<String, String> map);

        Observable<Login> getRegisterModel(@FieldMap Map<String, String> map);
    }

    interface View extends BaseView {
        void sendCodeSuccess();

        void registerSuccess(Login login);
    }

    abstract class Presenter extends BasePresenter<Model, View> {
        public abstract void getCode(String mobile);

        public abstract void register(String mobile, String code, String pwd, String referee, String birthday);
    }
}
